package com.study.talk.module.entity.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.*;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("用户注册参数")
public class UpdateUserInfoVo {

    @ApiModelProperty("昵称")
    private String nickName;

    @ApiModelProperty("头像地址")
    private String avatar;

    @ApiModelProperty("用户性别,女为0,男为1")
    @NotEmpty(message = "性别不能为空")
    @Max(value = 1,message = "用户性别错误")
    @Min(value = 0,message = "用户性别错误")
    private Integer gender;

    @ApiModelProperty("用户电话号码")
    @NotEmpty(message = "电话号码不能为空")
    private String phone;

    @ApiModelProperty("用户简介")
    private String introduce;

    @ApiModelProperty("用户邮箱")
    @Email(message = "邮箱格式错误")
    private String email;

    @ApiModelProperty("用户生日")
    @NotNull(message = "用户生日不能为空")
    private LocalDateTime birth;

    @ApiModelProperty("用户主页背景图片地址")
    private String bgImg;

    @ApiModelProperty("用户住址")
    @NotEmpty(message = "用户住址不能为空")
    private String address;
}
